package cn.com.utt.common.vo;

import java.util.HashMap;
import java.util.Map;

public class RestResult {
	private int errorCode = 0;
	private String errorMsg = "";
	private Map<String, Object> results = new HashMap<>();

	public int getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(int errorCode) {
		this.errorCode = errorCode;
	}

	public String getErrorMsg() {
		return errorMsg;
	}

	public void setErrorMsg(String errorMsg) {
		this.errorMsg = errorMsg;
	}

	public void put(String key, Object value) {
		results.put(key, value);
	}

	public Map<String, Object> toJsonObject() {
		results.put("errorCode", errorCode);
		results.put("errorMsg", errorMsg);
		return results;
	}

}
